3.1.75 \(\int \frac {(a+b \log (c x^n)) \log (d (e+f x)^m)}{x^2} \, dx\) [75]

Optimal. Leaf size=164 \[ \frac {b f m n \log (x)}{e}-\frac {b f m n \log ^2(x)}{2 e}+\frac {f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac {b f m n \log (e+f x)}{e}+\frac {b f m n \log \left (-\frac {f x}{e}\right ) \log (e+f x)}{e}-\frac {f m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{e}-\frac {b n \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+\frac {b f m n \text {Li}_2\left (1+\frac {f x}{e}\right )}{e} \]

[Out]

b*f*m*n*ln(x)/e-1/2*b*f*m*n*ln(x)^2/e+f*m*ln(x)*(a+b*ln(c*x^n))/e-b*f*m*n*ln(f*x+e)/e+b*f*m*n*ln(-f*x/e)*ln(f*
x+e)/e-f*m*(a+b*ln(c*x^n))*ln(f*x+e)/e-b*n*ln(d*(f*x+e)^m)/x-(a+b*ln(c*x^n))*ln(d*(f*x+e)^m)/x+b*f*m*n*polylog
(2,1+f*x/e)/e

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 164, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2442, 36, 29, 31, 2423, 2338, 2441, 2352} \begin {gather*} \frac {b f m n \text {PolyLog}\left (2,\frac {f x}{e}+1\right )}{e}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+\frac {f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac {f m \log (e+f x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac {b n \log \left (d (e+f x)^m\right )}{x}-\frac {b f m n \log ^2(x)}{2 e}+\frac {b f m n \log (x)}{e}-\frac {b f m n \log (e+f x)}{e}+\frac {b f m n \log \left (-\frac {f x}{e}\right ) \log (e+f x)}{e} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])*Log[d*(e + f*x)^m])/x^2,x]

[Out]

(b*f*m*n*Log[x])/e - (b*f*m*n*Log[x]^2)/(2*e) + (f*m*Log[x]*(a + b*Log[c*x^n]))/e - (b*f*m*n*Log[e + f*x])/e +
 (b*f*m*n*Log[-((f*x)/e)]*Log[e + f*x])/e - (f*m*(a + b*Log[c*x^n])*Log[e + f*x])/e - (b*n*Log[d*(e + f*x)^m])
/x - ((a + b*Log[c*x^n])*Log[d*(e + f*x)^m])/x + (b*f*m*n*PolyLog[2, 1 + (f*x)/e])/e

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2423

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((g_.)*(x_))^(q_.), x_Sym
bol] :> With[{u = IntHide[(g*x)^q*Log[d*(e + f*x^m)^r], x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[Dist
[1/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q + 1)/m] || (RationalQ[m] &
& RationalQ[q])) && NeQ[q, -1]

Rule 2441

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((f + g
*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])/g), x] - Dist[b*e*(n/g), Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x^2} \, dx &=\frac {f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac {f m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{e}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}-(b n) \int \left (\frac {f m \log (x)}{e x}-\frac {f m \log (e+f x)}{e x}-\frac {\log \left (d (e+f x)^m\right )}{x^2}\right ) \, dx\\ &=\frac {f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac {f m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{e}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+(b n) \int \frac {\log \left (d (e+f x)^m\right )}{x^2} \, dx-\frac {(b f m n) \int \frac {\log (x)}{x} \, dx}{e}+\frac {(b f m n) \int \frac {\log (e+f x)}{x} \, dx}{e}\\ &=-\frac {b f m n \log ^2(x)}{2 e}+\frac {f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}+\frac {b f m n \log \left (-\frac {f x}{e}\right ) \log (e+f x)}{e}-\frac {f m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{e}-\frac {b n \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+(b f m n) \int \frac {1}{x (e+f x)} \, dx-\frac {\left (b f^2 m n\right ) \int \frac {\log \left (-\frac {f x}{e}\right )}{e+f x} \, dx}{e}\\ &=-\frac {b f m n \log ^2(x)}{2 e}+\frac {f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}+\frac {b f m n \log \left (-\frac {f x}{e}\right ) \log (e+f x)}{e}-\frac {f m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{e}-\frac {b n \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+\frac {b f m n \text {Li}_2\left (1+\frac {f x}{e}\right )}{e}+\frac {(b f m n) \int \frac {1}{x} \, dx}{e}-\frac {\left (b f^2 m n\right ) \int \frac {1}{e+f x} \, dx}{e}\\ &=\frac {b f m n \log (x)}{e}-\frac {b f m n \log ^2(x)}{2 e}+\frac {f m \log (x) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac {b f m n \log (e+f x)}{e}+\frac {b f m n \log \left (-\frac {f x}{e}\right ) \log (e+f x)}{e}-\frac {f m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{e}-\frac {b n \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}+\frac {b f m n \text {Li}_2\left (1+\frac {f x}{e}\right )}{e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 117, normalized size = 0.71 \begin {gather*} -\frac {b f m n x \log ^2(x)+2 \left (a+b n+b \log \left (c x^n\right )\right ) \left (f m x \log (e+f x)+e \log \left (d (e+f x)^m\right )\right )-2 f m x \log (x) \left (a+b n+b \log \left (c x^n\right )+b n \log (e+f x)-b n \log \left (1+\frac {f x}{e}\right )\right )+2 b f m n x \text {Li}_2\left (-\frac {f x}{e}\right )}{2 e x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])*Log[d*(e + f*x)^m])/x^2,x]

[Out]

-1/2*(b*f*m*n*x*Log[x]^2 + 2*(a + b*n + b*Log[c*x^n])*(f*m*x*Log[e + f*x] + e*Log[d*(e + f*x)^m]) - 2*f*m*x*Lo
g[x]*(a + b*n + b*Log[c*x^n] + b*n*Log[e + f*x] - b*n*Log[1 + (f*x)/e]) + 2*b*f*m*n*x*PolyLog[2, -((f*x)/e)])/
(e*x)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.30, size = 1892, normalized size = 11.54

method result size
risch \(\text {Expression too large to display}\) \(1892\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*ln(d*(f*x+e)^m)/x^2,x,method=_RETURNVERBOSE)

[Out]

b*f*m*n*ln(-f*x/e)*ln(f*x+e)/e+b*f*m*n*ln(x)/e-1/2*b*f*m*n*ln(x)^2/e-b*f*m*n*ln(f*x+e)/e-ln(d)*b/x*ln(x^n)-1/2
*I/x*Pi*ln(d)*b*csgn(I*c)*csgn(I*c*x^n)^2+1/4*Pi^2*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)^2/x*b*csgn(I*c)*csgn(
I*c*x^n)^2+1/4*Pi^2*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)^2/x*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*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*b*Pi*csgn(I*c)*csgn(I*c*x^
n)^2+1/2*I*f*m/e*ln(f*x+e)*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-1/4*Pi^2*csgn(I*d)*csgn(I*(f*x+e)^m)*csgn(
I*d*(f*x+e)^m)/x*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*Pi^2*csgn(I*d)*csgn(I*d*(f*x+e)^m)^2/x*b*csgn(I*c)*csgn(I*x
^n)*csgn(I*c*x^n)-1/4*Pi^2*csgn(I*d)*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)/x*b*csgn(I*c)*csgn(I*c*x^n)^2-1/4*P
i^2*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)^2/x*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-1/2*I*f*m/e*ln(f*x+e)*b*Pi
*csgn(I*c)*csgn(I*c*x^n)^2-1/2*I/x*Pi*a*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)^2-1/4*Pi^2*csgn(I*d*(f*x+e)^m)^3
/x*b*csgn(I*c)*csgn(I*c*x^n)^2-1/4*Pi^2*csgn(I*d*(f*x+e)^m)^3/x*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*Pi^2*csgn(I*
d)*csgn(I*d*(f*x+e)^m)^2/x*b*csgn(I*c*x^n)^3

________________________________________________________________________________________

Maxima [A]
time = 0.39, size = 198, normalized size = 1.21 \begin {gather*} -{\left (\log \left (f x e^{\left (-1\right )} + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-f x e^{\left (-1\right )}\right )\right )} b f m n e^{\left (-1\right )} - {\left (a f m + {\left (f m n + f m \log \left (c\right )\right )} b\right )} e^{\left (-1\right )} \log \left (f x + e\right ) + \frac {{\left (2 \, b f m n x \log \left (f x + e\right ) \log \left (x\right ) - b f m n x \log \left (x\right )^{2} + 2 \, {\left (a f m + {\left (f m n + f m \log \left (c\right )\right )} b\right )} x \log \left (x\right ) - 2 \, {\left ({\left (n \log \left (d\right ) + \log \left (c\right ) \log \left (d\right )\right )} b + a \log \left (d\right )\right )} e - 2 \, {\left (b e \log \left (x^{n}\right ) + {\left (b {\left (n + \log \left (c\right )\right )} + a\right )} e\right )} \log \left ({\left (f x + e\right )}^{m}\right ) - 2 \, {\left (b f m x \log \left (f x + e\right ) - b f m x \log \left (x\right ) + b e \log \left (d\right )\right )} \log \left (x^{n}\right )\right )} e^{\left (-1\right )}}{2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x+e)^m)/x^2,x, algorithm="maxima")

[Out]

-(log(f*x*e^(-1) + 1)*log(x) + dilog(-f*x*e^(-1)))*b*f*m*n*e^(-1) - (a*f*m + (f*m*n + f*m*log(c))*b)*e^(-1)*lo
g(f*x + e) + 1/2*(2*b*f*m*n*x*log(f*x + e)*log(x) - b*f*m*n*x*log(x)^2 + 2*(a*f*m + (f*m*n + f*m*log(c))*b)*x*
log(x) - 2*((n*log(d) + log(c)*log(d))*b + a*log(d))*e - 2*(b*e*log(x^n) + (b*(n + log(c)) + a)*e)*log((f*x +
e)^m) - 2*(b*f*m*x*log(f*x + e) - b*f*m*x*log(x) + b*e*log(d))*log(x^n))*e^(-1)/x

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x+e)^m)/x^2,x, algorithm="fricas")

[Out]

integral((b*log(c*x^n) + a)*log((f*x + e)^m*d)/x^2, x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*ln(d*(f*x+e)**m)/x**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x+e)^m)/x^2,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*log((f*x + e)^m*d)/x^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\ln \left (d\,{\left (e+f\,x\right )}^m\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(d*(e + f*x)^m)*(a + b*log(c*x^n)))/x^2,x)

[Out]

int((log(d*(e + f*x)^m)*(a + b*log(c*x^n)))/x^2, x)

________________________________________________________________________________________